<?php
$aPriKey = array();
$aPriKey['N'] = _t('not primary-key');
$aPriKey['Y'] = _t('primary-key');
$aPriKey['X'] = _t('primary-key auto-increment');
function getEntityHeader($entity) {
	global $objSDAO,$objUser;
	$sSQL = "SELECT e.description AS e_description, x.data_area, x.description AS x_description " .
			" FROM  entity e " .
			" LEFT JOIN data_area x ON x.data_area = e.data_area " .
			" WHERE e.entity='$entity' ";
	$query = $objSDAO->query($sSQL,'entHead');
	$row = $objSDAO->fetch('entHead');
	$dataArea = $row['data_area'];
	$sHtml = "<table class=\"tabl01\" width=\"100%\" cellpadding=\"3\" cellspacing=\"2\">\n";
	$sHtml .= ("<tr>" .
			"<td class=\"tabh01\" width='15%'>Data-Area</td>" .
			"<td class=\"text01\" width='85%'>".
				"<a class='text01' href='../area/datasAreaView.php?da=$dataArea&xsn=".XSN.
				"' title='"._t('data-area view')."'>$dataArea</a> - ".
				sxHE($row['x_description'])."</td>" .
			"</tr>\n");
	$sHtml .= ("<tr>" .
			"<td class=\"tabh01\">Entity</td>" .
			"<td class=\"text01\">".
				"<b><a class='text01' href='../enty/entityView.php?ent=$entity&da=$dataArea&xsn=".XSN.
				"' title='"._t('entity view')."'>$entity</a> - ".
				sxHE($row['e_description'])."</b></td>" .
			"</tr>\n</table>\n");
	return $sHtml;
}

